<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>layui</title>
		<link rel="stylesheet" href="js/layui/css/layui.css" />
	</head>
	<body>
		<div class="layui-container layui-bg-blue" style="width: 80%;">
			<fieldset class="layui-elem-field">
				<legend>数据维护</legend>
				<div class="layui-field-box" style="width: 80%;">
					<div class="layui-form-item">
						<label class="layui-form-label">姓名</label>
						<div class="layui-input-inline">
							<input type="text" name="name" required lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input" />
						</div>
						<input type="button" value="查询" class='layui-btn' />
						<input type="button" value="添加" class='layui-btn' />
					</div>
				</div>
				<hr class="layui-bg-gray" />
				<table class="layui-table" style="width: 90%;">
					<thead>
						<th style="width: 10%;">ID</th>
						<th style="width: 10%;">姓名</th>
						<th style="width: 10%;">年龄</th>
						<th style="width: 10%;">生日</th>
						<th style="width: 10%;">操作</th>
					</thead>
					<tbody id="tbody"></tbody>
				</table>
			</fieldset>
		</div>


		<script type="text/javascript" src="js/jquery-3.6.0.js"></script>
		<script type="text/javascript" src="./js/layui/layui.js"></script>
		<script type="text/javascript" src="./js/problem01_layui.js"></script>
		<script type="text/html" id='testa'>
			<form class="layui-form">
				<div class="layui-field-box">
					<div class="layui-form-item">
						<label class="layui-form-label">姓名</label>
						<div class="layui-input-inline">
							<input type="text" name="name2" lay-verify="required" placeholder="请输入姓名" autocomplete="off"
								class="layui-input" />
						</div>
					</div>
				</div>
				<div class="layui-field-box">
					<div class="layui-form-item">
						<label class="layui-form-label">年龄</label>
						<div class="layui-input-inline">
							<input type="text" name="age" lay-verify="required" placeholder="请输入年龄" autocomplete="off"
								class="layui-input" />
						</div>
					</div>
				</div>
				<div class="layui-field-box">
					<div class="layui-form-item">
						<label class="layui-form-label">生日</label>
						<div class="layui-input-inline">
							<input type="text" id="birth" name="birth" lay-verify="required" placeholder="请输入生日" autocomplete="off"
								class="layui-input" />
						</div>
					</div>
				</div>
				<div class="layui-field-box">
					<div class="layui-form-item">
						<div class="layui-input-block">
							<input type="button" value="确定" class='layui-btn' />
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							<input type="button" value="关闭" class='layui-btn' />
						</div>
					</div>
				</div>
			</form>
		</script>
		<script type="text/html" id="tradd">
		<tr id="tr{{ d.id }}">
		    <td id="tda{{ d.id }}">{{ d.id }}</td>
			<td id="tdb{{ d.id }}">{{ d.name }}</td>
			<td id="tdc{{ d.id }}">{{ d.age }}</td>
			<td id="tdd{{ d.id }}">{{ d.birth }}</td>
			<td id="tde{{ d.id }}">
			<a href="javascript:del({{d.id}});" class="layui-btn layui-btn-xs layui-btn-danger">删除</a>
			<a href="javascript:upd({{d.id}});" class="layui-btn layui-btn-xs">修改</a>
			</td>
		</tr>
		</script>
	</body>
</html>
